import _regeneratorRuntime from "@babel/runtime/regenerator";
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
import request from 'utils/request';
import { CPAAS_FILE } from 'utils/config';
import { getCurrentOrganizationId, isTenantRoleLevel } from 'utils/utils';
var organizationId = getCurrentOrganizationId();

function apiSource() {
  return isTenantRoleLevel() ? "".concat(organizationId, "/file-edit-logs") : "file-edit-logs";
}
/**
 * 查询文件汇总列表数据
 * @async
 * @function queryLogList
 * @param {object} params - 查询条件
 */


export function queryLogList(_x) {
  return _queryLogList.apply(this, arguments);
}

function _queryLogList() {
  _queryLogList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            return _context.abrupt("return", request("".concat(CPAAS_FILE, "/v1/").concat(apiSource()), {
              method: 'GET',
              query: params
            }));

          case 1:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return _queryLogList.apply(this, arguments);
}